home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Medal Software 5
/
Gold Medal Software - Volume 5 (Gold Medal) (1995).iso
/
windows
/
win31
/
cenviw.arj
/
DOSTIME.CMM
< prev
next >
Wrap
Text File
|
1994-03-08
|
997b
|
30 lines
/***************************************************
*** DosTime - CEnvi example program for showing ***
*** ver.1 the Dos system time ***
***************************************************/
#include "WinTools.lib"
// give minimum screen size because time takes up little room
ScreenSize(12,1);
// force screen to show, just so we can then resize and move it
putchar(' ');
// move this small window to the very bottom-right corner of the screen
GetSize(ScreenHandle(),WinWidth,WinHeight);
GetScreenSize(TotalWidth,TotalHeight);
SetPosition(ScreenHandle(),
TotalWidth - (WinWidth * 8 / 12), // against right edge of screen so only numbers show
TotalHeight - WinHeight); // against bottom of screen
// print the time once per second and hang out here until a key is pressed
while( !kbhit() ) {
reg.ah = 0x2C
interrupt(0x21,reg)
printf("\r%2d:%02d:%02d",reg.ch,reg.cl,reg.dh)
Suspend(1000);
}